package com.tianyu.inspection.entity.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.Objects;

/**********************************
 * @Author YSW
 * @Description 云盒接收类型
 * @Date 2021/1/8 - 11:12
 **********************************/

@Data
@Accessors(chain = true)
public class BoxMo {
    private String telemetryServerIp;
    private Integer telemetryServerPort;
    private String videoServer;
    private Integer videoPort;
    private Integer taskId;
    private Integer lastTaskId;
    private String boxSn;
    private String boxName;
    private String boxVersion;
    private String sim1;
    private String telemetryMode;
    private String videMode;
    private String videoFormat;
    private String openVideoStorage;
    private String openTelemeterStorage;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date startTime;
    private Integer onLine;
    private Integer controlType;
    private Integer ptzType;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        BoxMo boxMo = (BoxMo) o;
        return boxSn.equals(boxMo.boxSn);
    }

    @Override
    public int hashCode() {
        return Objects.hash(boxSn);
    }
}
